import cv2
from datetime import datetime

def add_time_to_image(frame):
    now = datetime.now() 
    time = now.strftime("%H:%M:%S.%f")[:-3]
    font=cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(frame, "Time:"+time,
                          (200, 100), font,1,(0, 255, 255),2,cv2.LINE_4)
    return frame  

def add_ultrasonic_servo_angle_to_image(frame,vertical_servo):
    font=cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(frame, "The Angle of Ultrasonic Servo",
                        (100, 150), font,1,(65,105,225),2,cv2.LINE_4)
    cv2.putText(frame, "  "+str(vertical_servo.servo.current_angle),
                            (100, 200), font,1,(0, 255, 255),2,cv2.LINE_4)
    return frame  

def add_object_feature_image(frame):
    font=cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(frame, "Object Feature",
                            (200, 50), font,1,(0, 255, 255),2,cv2.LINE_4)
    return frame  
        
